add libelf: an ELF binary parser library.
authorEmmanuel Ackaouy <ack@xensource.com>
Thu, 25 Jan 2007 22:16:52 +0000 (22:16 +0000)
committerEmmanuel Ackaouy <ack@xensource.com>
Thu, 25 Jan 2007 22:16:52 +0000 (22:16 +0000)
commiteca96c65d99317513bd10804b641b3da7049b56c
tree47c08e6587c11eee5361492285461b1cda8f9de9
parent690dd07a38f366d71b64c1ddc518b6992601e9da
add libelf: an ELF binary parser library.

This patch adds a library with a small collection of helper functions
to parse and load elf binaries.  The library handles endianess and
elfsize at runtime.

The patch also shuffles around the include files a bit.  Now there is
*one* include file holding all the elf structures
(xen/include/public/elfstructs.h) which is included by everyone who
needs them.

It's dead code with this patch only, putting the code into use happens
in followup patches.

Signed-off-by: Gerd Hoffmann <kraxel@suse.de>
---
 tools/libxc/xc_elf.h                |  525 -----------------------------------
 xen/arch/x86/boot/mkelf32.c         |    2
 xen/common/Makefile                 |    2
 xen/common/libelf/Makefile          |    4
 xen/common/libelf/README            |    1
 xen/common/libelf/libelf-dominfo.c  |  420 ++++++++++++++++++++++++++++
 xen/common/libelf/libelf-loader.c   |  156 ++++++++++
 xen/common/libelf/libelf-private.h  |   51 +++
 xen/common/libelf/libelf-relocate.c |  345 +++++++++++++++++++++++
 xen/common/libelf/libelf-tools.c    |  225 +++++++++++++++
 xen/include/public/elfstructs.h     |  527 ++++++++++++++++++++++++++++++++++++
 xen/include/public/libelf.h         |  238 ++++++++++++++++
 xen/include/xen/elf.h               |  490 ---------------------------------
 13 files changed, 1972 insertions(+), 1014 deletions(-)
13 files changed:
tools/libxc/xc_elf.h
xen/arch/x86/boot/mkelf32.c
xen/common/Makefile
xen/common/libelf/Makefile [new file with mode: 0644]
xen/common/libelf/README [new file with mode: 0644]
xen/common/libelf/libelf-dominfo.c [new file with mode: 0644]
xen/common/libelf/libelf-loader.c [new file with mode: 0644]
xen/common/libelf/libelf-private.h [new file with mode: 0644]
xen/common/libelf/libelf-relocate.c [new file with mode: 0644]
xen/common/libelf/libelf-tools.c [new file with mode: 0644]
xen/include/public/elfstructs.h [new file with mode: 0644]
xen/include/public/libelf.h [new file with mode: 0644]
xen/include/xen/elf.h